package com.soushin.mvpdemo.base;

/**
 * 逻辑处理基类
 */
public abstract class BasePresenter<V extends BaseView> {
    private V mvpView;

    /**
     * 绑定View
     * 设置状态栏
     * 调用initView()
     * @param mvpView
     */
     public void subscribe(V mvpView){
        this.mvpView= mvpView;
        getMvpView().initView();
    }

    /**
     * 解绑
     */
    public void unsubscribe(){
        mvpView = null;
    }

    /**
     *  获取View
     * @return
     */
    public V getMvpView(){
        return mvpView;
    }
}
